package com.nut.spp.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.nut.spp.api.req.MemberLevelRecordQueryReq;
import com.nut.spp.common.Result;
import com.nut.spp.entity.MemberLevelRecord;
import com.nut.spp.mapper.MemberLevelRecordMapper;
import com.nut.spp.service.MemberLevelRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class MemberLevelRecordServiceImpl implements MemberLevelRecordService {

    @Autowired
    private MemberLevelRecordMapper memberLevelRecordMapper;

    @Override
    public Result<IPage<MemberLevelRecord>> listPage(MemberLevelRecordQueryReq req) {
        IPage<MemberLevelRecord> page = memberLevelRecordMapper.listPage(
                req.newPage(),
                req.getMemberId(),
                req.getOrderId(),
                req.getMobile(),
                req.getGoodsId(),
                req.getGoodsType()
        );
        return Result.ok(page);
    }

}
